package com.gotloop.dao;

import java.util.List;

import com.gotloop.jdo.Loop;
import com.gotloop.jdo.UserProfile;
import com.gotloop.jdo.Vote;
import com.gotloop.jdo.key.VotePK;

/**
 * Vote Data Access Object.
 * @author jibhaine
 *
 */
public interface VoteDAO extends AbstractDAO<Vote, VotePK> {

	/**
	 * how many votes for a Loop.
	 * @param loop get votes fot this loop
	 * @return int, 0 if no votes
	 */
	List<Vote> howManyVotes(Loop loop);
	
	/**
	 * how many times this user voted.
	 * @param userProfile Vote author
	 * @return number of votes.
	 */
	List<Vote> howManyVotes(UserProfile userProfile);
}
